import minRequest from '@/utils/request'

// 获取群分页消息参数
interface DemoGetParams {
  groupId?: string
  userId?: string
  friendId?: string
  current: number
  pageSize: number
}

export async function get(params: DemoGetParams) {
  return minRequest.get('/demo/get', params)
}

interface DemoPostParams {
  groupId?: string
  userId?: string
  friendId?: string
  current: number
  pageSize: number
}

export async function post(params: DemoPostParams) {
  return minRequest.post('/demo/post', params)
}

interface DemoPostFormParams {
  groupId?: string
  userId?: string
  friendId?: string
  current: number
  pageSize: number
}
export async function postForm(params: DemoPostFormParams) {
  return minRequest.post('/demo/postForm', params, {
    header: {
      'Content-Type': 'multipart/form-data',
    },
  })
}
